<?php
/**
 * TOP API: taobao.trade.voucher.upload request
 * 
 * @author auto create
 * @since 1.0, 2016.11.07
 */
class TradeVoucherUploadRequest
{
	/** 
	 * 该笔订单的买家Nick（混淆nick）
	 **/
	private $buyerNick;
	
	/** 
	 * 文件
	 **/
	private $fileData;
	
	/** 
	 * 上传文件的名称
	 **/
	private $fileName;
	
	/** 
	 * 该笔订单的卖家Nick
	 **/
	private $sellerNick;
	
	private $apiParas = array();
	
	public function setBuyerNick($buyerNick)
	{
		$this->buyerNick = $buyerNick;
		$this->apiParas["buyer_nick"] = $buyerNick;
	}

	public function getBuyerNick()
	{
		return $this->buyerNick;
	}

	public function setFileData($fileData)
	{
		$this->fileData = $fileData;
		$this->apiParas["file_data"] = $fileData;
	}

	public function getFileData()
	{
		return $this->fileData;
	}

	public function setFileName($fileName)
	{
		$this->fileName = $fileName;
		$this->apiParas["file_name"] = $fileName;
	}

	public function getFileName()
	{
		return $this->fileName;
	}

	public function setSellerNick($sellerNick)
	{
		$this->sellerNick = $sellerNick;
		$this->apiParas["seller_nick"] = $sellerNick;
	}

	public function getSellerNick()
	{
		return $this->sellerNick;
	}

	public function getApiMethodName()
	{
		return "taobao.trade.voucher.upload";
	}
	
	public function getApiParas()
	{
		return $this->apiParas;
	}
	
	public function check()
	{
		
		RequestCheckUtil::checkNotNull($this->fileData,"fileData");
		RequestCheckUtil::checkNotNull($this->fileName,"fileName");
		RequestCheckUtil::checkMaxLength($this->fileName,50,"fileName");
	}
	
	public function putOtherTextParam($key, $value) {
		$this->apiParas[$key] = $value;
		$this->$key = $value;
	}
}
